package tut.thread.join;;

public class WaitThreadExe {
	public static void main(String[] args){
		Thread t2 = new Thread(new WaitThread());
		Thread t3 = new Thread(new WaitThread());

		System.out.println("Current time " + System.currentTimeMillis());

		t2.start();

		try {
			t2.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println("Current time " + System.currentTimeMillis());

		t3.start();

		try {
			t3.join(1000);
		} catch (Exception e) {
		}

		System.out.println("Current time " + System.currentTimeMillis());
	}
}
